home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CADAR
/
Lengths
/
rhythm-ornament
< prev
next >
Wrap
Text File
|
1998-10-22
|
2KB
|
63 lines
rhythm-ornament
min max length-list &key
(type :all) (seed nil) (pcnt 100) (to-pcnt nil)
legal types :all :evens :odds
divides lengths randomly inside min and max.
it does not always divide into even lengths so a 3-division
can be: 1/4 -> 1/12 1/12 1/12 or 1/6 1/12 . . .
with type :evens selects only even numbers
with type :odds (you guessed it) only odd numbers
and with type :all (you guessed it again) both odd
and even numbers.
seed which default to nil works like in all other random
functions and :pcnt -> percent lets you control
how many percent that will be divided.
if you also use :to-pcnt
you can scale the percent-values and make nice morphing-like
results where the rhythm gets more and more subdivided
or less and less.
(rhythm-ornament 3 5 '(1/2 1/4 1/2 1/8 1/8) :seed 0.1)
->((1/5 1/5 1/10) (1/8 1/16 1/16) (3/10 1/5) (3/32 1/32)
(1/32 1/32 1/32 1/32))
(rhythm-ornament 3 5 '(1/2 1/4 1/2 1/8 1/8)
:seed 0.1 :type :odds)
->((1/5 1/5 1/10) (1/10 1/20 1/10) (3/10 1/5) (1/10 1/40)
(1/20 1/40 1/40 1/40))
(rhythm-ornament 3 5 '(1/2 1/4 1/2 1/8 1/8)
:seed 0.1 :type :evens)
->((1/8 1/4 1/8) (1/8 1/16 1/16) (1/4 1/4) (3/32 1/32)
(1/32 1/32 1/32 1/32))
(rhythm-ornament 3 5 '(1/2 1/4 1/2 1/8 1/8)
:seed 0.1 :type :all :pcnt 50)
->((1/5 1/5 1/10) (1/8 1/16 1/16) (1/2) (1/8)
(1/32 1/32 1/32 1/32))
(rhythm-ornament 3 5 (gen-palindrome
'(1/2 1/4 1/2 1/8 1/8))
:seed 0.1 :type :all :pcnt 100 :to-pcnt 0)
->((1/5 1/5 1/10) (1/8 1/16 1/16) (3/10 1/5) (1/8)
(1/32 1/32 1/32 1/32) (1/24 1/12) (1/2) (1/4) (1/8 1/4 1/8))
min and max can also be lists of integers so that you can vary
the division.
(rhythm-ornament '(3 4 2) '(4 9) '(1/2 1/4 1/2 1/8 1/8)
:seed 0.1)
->((1/8 1/4 1/8) (1/8 1/24 1/12) (1/4 1/4) (1/10 1/40)
(1/32 1/32 1/32 1/32))